home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
os2
/
pmcstex.zip
/
L2E_NDX.ZIP
/
LATEX2E.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-08-21
|
100KB
|
3,255 lines
ΓòÉΓòÉΓòÉ 1. -Preface- ΓòÉΓòÉΓòÉ
help 1.4
ΓòÉΓòÉΓòÉ 2. -Preface- ΓòÉΓòÉΓòÉ
This file documents LaTeX2e, a document preparation system. LaTeX2e is a macro
package for TeX.
This is edition 1.4 of the LaTeX2e documentation, and is for the Texinfo that
is distributed as part of Version 19 of GNU Emacs. It uses version 2.134 or
later of the texinfo.tex input file.
This is translated from LATEX.HLP v1.0a in the VMS Help Library. The
pre-translation version was written by George D. Greenwade of Sam Houston State
University.
The LaTeX 2.09 version was written by Stephen Gilmore (stg@dcs.ed.ac.uk).
The LaTeX2e version was adapted from this by Torsten Martinsen
(torsten@kom.auc.dk).
Copyright 1988,1994 Free Software Foundation, Inc. Copyright 1994 Torsten
Martinsen.
Permission is granted to make and distribute verbatim copies of this manual
provided the copyright notice and this permission notice are preserved on all
copies.
Permission is granted to copy and distribute modified versions of this manual
under the conditions for verbatim copying, provided that the entire resulting
derived work is distributed under the terms of a permission notice identical to
this one.
Permission is granted to copy and distribute translations of this manual into
another language, under the above conditions for modified versions, except that
the sections entitled ``Distribution'' and ``General Public License'' may be
included in a translation approved by the author instead of in the original
English.
LaTeX2e is a document preparation system implemented as a macro package for
Donald E. Knuth's TeX typesetting program.
LaTeX was originally conceived by Leslie Lamport.
This is edition 1.4 of the LaTeX2e documentation.
Overview What is LaTeX?
Commands Commands within a LaTeX document.
Parameters The command line. also available┬╖┬╖┬╖
List of Commands An alphabetical list of LaTeX commands.
Concept Index An alphabetical ``Concept Index''.
ΓòÉΓòÉΓòÉ 3. Overview of LaTeX and Local Guide ΓòÉΓòÉΓòÉ
The LaTeX command typesets a file of text using the TeX program and the LaTeX
Macro package for TeX. To be more specific, it processes an input file
containing the text of a document with interspersed commands that describe how
the text should be formatted. It produces at least three files as output:
1. A ``Device Independent'', or '.dvi' file. This contains commands that can
be translated into commands for a variety of output devices. You can view
the output of LaTeX by using a program such as xdvi, which actually uses
the '.dvi' file.
2. A ``transcript'' or '.log' file that contains summary information and
diagnostic messages for any errors discovered in the input file.
3. An ``auxiliary'' or '.aux' file. This is used by LaTeX itself, for things
such as sectioning.
For a description of what goes on inside TeX, you should consult The TeXbook
by Donald E. Knuth, ISBN 0-201-13448-9, published jointly by the American
Mathematical Society and Addison-Wesley Publishing Company.
For a description of LaTeX, you should consult:
LaTeX: A Document Preparation System, by Leslie Lamport, Addison-Wesley
Publishing Company, 2nd edition, 1994.
The LaTeX Companion, by Michel Goossens, Frank Mittelbach, and Alexander
Samarin, Addison-Wesley, 1994.
ΓòÉΓòÉΓòÉ 4. Commands ΓòÉΓòÉΓòÉ
A LaTeX command begins with the command name, which consists of a \ followed
by either (a) a string of letters or (b) a single non-letter. Arguments
contained in square brackets, [], are optional while arguments contained in
braces, {}, are required.
NOTE: LaTeX is case sensitive. Enter all commands in lower case unless
explicitly directed to do otherwise.
Counters Internal counters used by LaTeX.
Cross References Automatic referencing.
Definitions Define your own commands etc.
Document Classes Some of the various classes available.
Environments Such as enumerate & itemize.
Footnotes How to produce footnotes.
Lengths The length commands.
Letters The letter class.
Line & Page Breaking How to insert pagebreaks etc.
Making Paragraphs Paragraph commands.
Margin Notes Putting remarks in the margin.
Math Formulae How to create mathematical formulae.
Modes Paragraph, Math or LR modes.
Page Styles Various styles of page layout.
Sectioning How to section properly.
Spaces & Boxes All the associated commands.
Special Characters Special reserved characters.
Splitting the Input Dealing with big files by splitting.
Starting & Ending The formal start & end layouts.
Table of Contents How to create a table of contents.
Terminal Input/Output User interaction.
Typefaces Such as bold, italics etc.
ΓòÉΓòÉΓòÉ 4.1. Counters ΓòÉΓòÉΓòÉ
Everything LaTeX numbers for you has a counter associated with it. The name of
the counter is the same as the name of the environment or command that
produces the number, except with no \. (enumi - enumiv are used for the
nested enumerate environment.) Below is a list of the counters used in
LaTeX's standard document classes to control numbering.
part paragraph figure enumi
chapter subparagraph table enumii
section page footnote enumiii
subsection equation mpfootnote enumiv
subsubsection
\addtocounter
\alph
\arabic
\fnsymbol
\newcounter
\refstepcounter
\roman
\setcounter
\stepcounter
\usecounter
\value
ΓòÉΓòÉΓòÉ 4.1.1. \addtocounter ΓòÉΓòÉΓòÉ
\addtocounter{counter}{value}
The \addtocounter command increments the counter by the amount specified by
the value argument. The value argument can be negative.
ΓòÉΓòÉΓòÉ 4.1.2. \alph ΓòÉΓòÉΓòÉ
\alph{counter}
This command causes the value of the counter to be printed in alphabetic
characters. The \alph command causes lower case alphabetic alphabetic
characters, i.e., a, b, c┬╖┬╖┬╖ while the \Alph command causes upper case
alphabetic characters, i.e., A, B, C┬╖┬╖┬╖.
ΓòÉΓòÉΓòÉ 4.1.3. \arabic ΓòÉΓòÉΓòÉ
\arabic{counter}
The \arabic command causes the value of the counter to be printed in Arabic
numbers, i.e., 3.
ΓòÉΓòÉΓòÉ 4.1.4. \fnsymbol ΓòÉΓòÉΓòÉ
\fnsymbol{counter}
The \fnsymbol command causes the value of the counter to be printed in a
specific sequence of nine symbols that can be used for numbering footnotes.
eg. From 1-9:
NB. counter must have a value between 1 and 9 inclusive.
ΓòÉΓòÉΓòÉ 4.1.5. \newcounter ΓòÉΓòÉΓòÉ
\newcounter{foo}[counter]
The \newcounter command defines a new counter named foo. The counter is
initialized to zero.
The optional argument [counter] causes the counter foo to be reset whenever
the counter named in the optional argument is incremented.
ΓòÉΓòÉΓòÉ 4.1.6. \refstepcounter ΓòÉΓòÉΓòÉ
\refstepcounter{counter}
The \refstepcounter command works like \stepcounter See \stepcounter, except
it also defines the current \ref value to be the result of \thecounter.
ΓòÉΓòÉΓòÉ 4.1.7. \roman ΓòÉΓòÉΓòÉ
\roman{counter}
This command causes the value of the counter to be printed in Roman numerals.
The \roman command causes lower case Roman numerals, i.e., i, ii, iii┬╖┬╖┬╖,
while the \Roman command causes upper case Roman numerals, i.e., I, II,
III┬╖┬╖┬╖.
ΓòÉΓòÉΓòÉ 4.1.8. \stepcounter ΓòÉΓòÉΓòÉ
\stepcounter{counter}
The \stepcounter command adds one to the counter and resets all subsidiary
counters.
ΓòÉΓòÉΓòÉ 4.1.9. \setcounter ΓòÉΓòÉΓòÉ
\setcounter{counter}{value}
The \setcounter command sets the value of the counter to that specified by the
value argument.
ΓòÉΓòÉΓòÉ 4.1.10. \usecounter ΓòÉΓòÉΓòÉ
\usecounter{counter}
The \usecounter command is used in the second argument of the list environment
to allow the counter specified to be used to number the list items.
ΓòÉΓòÉΓòÉ 4.1.11. \value ΓòÉΓòÉΓòÉ
\value{counter}
The \value command produces the value of the counter named in the mandatory
argument. It can be used where LaTeX expects an integer or number, such as
the second argument of a \setcounter or \addtocounter command, or in:
\hspace{\value{foo}\parindent}
It is useful for doing arithmetic with counters.
ΓòÉΓòÉΓòÉ 4.2. Cross References ΓòÉΓòÉΓòÉ
One reason for numbering things like figures and equations is to refer the
reader to them, as in ``See Figure 3 for more details.''
\label
\pageref
\ref
ΓòÉΓòÉΓòÉ 4.2.1. \label ΓòÉΓòÉΓòÉ
\label{key}
A \label command appearing in ordinary text assigns to the key the number of
the current sectional unit; one appearing inside a numbered environment
assigns that number to the key.
A key can consist of any sequence of letters, digits, or punctuation
characters. Upper and lowercase letters are different.
To avoid accidentally creating two labels with the same name, it is common to
use labels consisting of a prefix and a suffix separated by a colon. The
prefixes conventionally used are
o cha for chapters
o sec for lower-level sectioning commands
o fig for figures
o tab for tables
o eq for equations
Thus, a label for a figure would look like fig:bandersnatch.
ΓòÉΓòÉΓòÉ 4.2.2. \pageref ΓòÉΓòÉΓòÉ
\pageref{key}
The \pageref command produces the page number of the place in the text where
the corresponding \label command appears. ie. where \label{key} appears.
ΓòÉΓòÉΓòÉ 4.2.3. \ref ΓòÉΓòÉΓòÉ
\ref{key}
The \ref command produces the number of the sectional unit, equation number,
┬╖┬╖┬╖ of the corresponding \label command.
ΓòÉΓòÉΓòÉ 4.3. Definitions ΓòÉΓòÉΓòÉ
\newcommand
\newenvironment
\newtheorem
\newfont
ΓòÉΓòÉΓòÉ 4.3.1. \newcommand ΓòÉΓòÉΓòÉ
\newcommand{cmd}[args]{definition}
\newcommand{cmd}[args][default]{definition}
\renewcommand{cmd}[args]{definition}
\renewcommand{cmd}[args][default]{definition}
These commands define (or redefine) a command.
cmd A command name beginning with a \. For \newcommand it must not be
already defined and must not begin with \end; for \renewcommand it
must already be defined.
args An integer from 1 to 9 denoting the number of arguments of the
command being defined. The default is for the command to have no
arguments.
def If this optional parameter is present, it means that the command's
first argument is optional. The default value of the optional
argument is def.
definitionThe text to be substituted for every occurrence of cmd; a parameter
of the form #n in cmd is replaced by the text of the nth argument
when this substitution takes place.
ΓòÉΓòÉΓòÉ 4.3.2. \newenvironment ΓòÉΓòÉΓòÉ
\newenvironment{nam}[args]{begdef}{enddef}
\newenvironment{nam}[args][default]{begdef}{enddef}
\renewenvironment{nam}[args]{begdef}{enddef}
These commands define or redefine an environment.
nam The name of the environment. For \newenvironment there must be no
currently defined environment by that name, and the command \nam
must be undefined. For \renewenvironment the environment must
already be defined.
args An integer from 1 to 9 denoting the number of arguments of the
newly-defined environment. The default is no arguments.
default If this is specified, the first argument is optional, and default
gives the default value for that argument.
begdef The text substituted for every occurrence of \begin{nam}; a
parameter of the form #n in cmd is replaced by the text of the nth
argument when this substitution takes place.
enddef The text substituted for every occurrence of \end{nam}. It may not
contain any argument parameters.
ΓòÉΓòÉΓòÉ 4.3.3. \newtheorem ΓòÉΓòÉΓòÉ
\newtheorem{env_name}{caption}[within]
\newtheorem{env_name}[numbered_like]{caption}
This command defines a theorem-like environment.
env_name The name of the environment to be defined. A string of letters. It
must not be the name of an existing environment or counter.
caption The text printed at the beginning of the environment, right before
the number. This may simply say ``Theorem'', for example.
within The name of an already defined counter, usually of a sectional unit.
Provides a means of resetting the new theorem counter within the
sectional unit.
numbered_likeThe name of an already defined theorem-like environment.
The \newtheorem command may have at most one optional argument.
ΓòÉΓòÉΓòÉ 4.3.4. \newfont ΓòÉΓòÉΓòÉ
\newfont{cmd}{font_name}
Defines the command name cmd, which must not be currently defined, to be a
declaration that selects the font named font_name to be the current font.
ΓòÉΓòÉΓòÉ 4.4. Document Classes ΓòÉΓòÉΓòÉ
Valid LaTeX document classes include:
o article
o report
o letter
o book
o slides
Other document classes are often available. See Overview, for details. They
are selected with the following command:
\documentclass [options] {class}
All the standard classes (except slides) accept the following options for
selecting the typeface size (10 pt is default):
10pt, 11pt, 12pt
All classes accept these options for selecting the paper size (default is
letter):
a4paper, a5paper, b5paper, letterpaper, legalpaper, executivepaper
Miscellaneous options:
o landscape --- selects landscape format. Default is portrait.
o titlepage, notitlepage --- selects if there should be a separate title page.
o leqno --- equation number on left side of equations. Default is right side.
o fleqn --- displayed formulas flush left. Default is centred.
o openbib --- use ``open'' bibliography format.
o draft, final --- mark/do not mark overfull boxes with a rule. Default is
final.
These options are not available with the slides class:
o oneside, twoside --- selects one- or twosided layout. Default is oneside,
except for the book class.
o openright, openany --- determines if a chapter should start on a right-hand
page. Default is openright for book.
o onecolumn, twocolumn --- one or two columns. Defaults to one column.
The slides class offers the option clock for printing the time at the bottom
of each note.
If you specify more than one option, they must be separated by a comma.
Additional packages are loaded by a
\usepackage[options]{pkg}
command. If you specify more than one package, they must be separated by a
comma.
Any options given in the \documentclass command that are unknown by the
selected document class are passed on to the packages loaded with \usepackage.
\flushbottom
\onecolumn
\raggedbottom
\twocolumn
ΓòÉΓòÉΓòÉ 4.4.1. \flushbottom ΓòÉΓòÉΓòÉ
The \flushbottom declaration makes all text pages the same height, adding
extra vertical space when necessary to fill out the page.
This is the standard if twocolumn mode is selected.
ΓòÉΓòÉΓòÉ 4.4.2. \onecolumn ΓòÉΓòÉΓòÉ
The \onecolumn declaration starts a new page and produces single-column
output.
ΓòÉΓòÉΓòÉ 4.4.3. \raggedbottom ΓòÉΓòÉΓòÉ
The \raggedbottom declaration makes all pages the height of the text on that
page. No extra vertical space is added.
ΓòÉΓòÉΓòÉ 4.4.4. \twocolumn ΓòÉΓòÉΓòÉ
\twocolumn[text]
The \twocolumn declaration starts a new page and produces two-column output.
If the optional text argument is present, it is typeset in one-column mode.
ΓòÉΓòÉΓòÉ 4.5. Environments ΓòÉΓòÉΓòÉ
LaTeX provides a number of different paragraph-making environments. Each
environment begins and ends in the same manner.
\begin{environment-name}
.
.
.
\end{environment-name}
array Math arrays.
center Centred lines.
description Labelled lists.
enumerate Numbered lists.
eqnarray Sequences of aligned equations.
equation Displayed equation.
figure Floating figures.
flushleft Flushed left lines.
flushright Flushed right lines.
itemize Bulleted lists.
letter Letters.
list Generic list environment.
minipage Miniature page.
picture Picture with text, arrows, lines and circles.
quotation Indented environment with paragraph indentation.
quote Indented environment with no paragraph
indentation.
tabbing Align text arbitrarily.
table Floating tables.
tabular Align text in columns.
thebibliography Bibliography or reference list.
theorem Theorems, lemmas, etc.
titlepage For hand crafted title pages.
verbatim Simulating typed input.
verse For poetry and other things.
ΓòÉΓòÉΓòÉ 4.5.1. array ΓòÉΓòÉΓòÉ
\begin{array}{col1col2┬╖┬╖┬╖coln}
column 1 entry & column 2 entry ┬╖┬╖┬╖ & column n entry \\
.
.
.
\end{array}
Math arrays are produced with the array environment. It has a single
mandatory argument describing the number of columns and the alignment within
them. Each column, coln, is specified by a single letter that tells how items
in that row should be formatted.
o c --- for centred
o l --- for flush left
o r --- for flush right
Column entries must be separated by an &. Column entries may include other
LaTeX commands. Each row of the array must be terminated with the string \\.
Note that the array environment can only be used in math mode, so normally it
is used inside an equation environment.
ΓòÉΓòÉΓòÉ 4.5.2. center ΓòÉΓòÉΓòÉ
\begin{center}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{center}
The center environment allows you to create a paragraph consisting of lines
that are centred within the left and right margins on the current page. Each
line must be terminated with the string \\.
\centering
ΓòÉΓòÉΓòÉ 4.5.2.1. \centering ΓòÉΓòÉΓòÉ
This declaration corresponds to the center environment. This declaration can
be used inside an environment such as quote or in a parbox. The text of a
figure or table can be centred on the page by putting a \centering command at
the beginning of the figure or table environment.
Unlike the center environment, the \centering command does not start a new
paragraph; it simply changes how LaTeX formats paragraph units. To affect a
paragraph unit's format, the scope of the declaration must contain the blank
line or \end command (of an environment like quote) that ends the paragraph
unit.
ΓòÉΓòÉΓòÉ 4.5.3. description ΓòÉΓòÉΓòÉ
\begin{description}
\item [label] First item
\item [label] Second item
.
.
.
\end{description}
The description environment is used to make labelled lists. The label is bold
face and flushed right.
ΓòÉΓòÉΓòÉ 4.5.4. enumerate ΓòÉΓòÉΓòÉ
\begin{enumerate}
\item First item
\item Second item
.
.
.
\end{enumerate}
The enumerate environment produces a numbered list. Enumerations can be
nested within one another, up to four levels deep. They can also be nested
within other paragraph-making environments.
Each item of an enumerated list begins with an \item command. There must be at
least one \item command within the environment.
The enumerate environment uses the enumi through enumiv counters (see
Counters). The type of numbering can be changed by redefining \theenumi etc.
ΓòÉΓòÉΓòÉ 4.5.5. eqnarray ΓòÉΓòÉΓòÉ
\begin{eqnarray}
math formula 1 \\
math formula 2 \\
.
.
.
\end{eqnarray}
The eqnarray environment is used to display a sequence of equations or
inequalities. It is very much like a three-column array environment, with
consecutive rows separated by \\ and consecutive items within a row separated
by an &.
An equation number is placed on every line unless that line has a \nonumber
command.
The command \lefteqn is used for splitting long formulas across lines. It
typesets its argument in display style flush left in a box of zero width.
ΓòÉΓòÉΓòÉ 4.5.6. equation ΓòÉΓòÉΓòÉ
\begin{equation}
math formula
\end{equation}
The equation environment centres your equation on the page and places the
equation number in the right margin.
ΓòÉΓòÉΓòÉ 4.5.7. figure ΓòÉΓòÉΓòÉ
\begin{figure}[placement]
body of the figure
\caption{figure title}
\end{figure}
Figures are objects that are not part of the normal text, and are usually
``floated'' to a convenient place, like the top of a page. Figures will not be
split between two pages.
The optional argument [placement] determines where LaTeX will try to place
your figure. There are four places where LaTeX can possibly put a float:
1. h (Here) - at the position in the text where the figure environment
appears.
2. t (Top) - at the top of a text page.
3. b (Bottom) - at the bottom of a text page.
4. p (Page of floats) - on a separate float page, which is a page containing
no text, only floats.
The standard report and article classes use the default placement tbp.
The body of the figure is made up of whatever text, LaTeX commands, etc. you
wish. The \caption command allows you to title your figure.
ΓòÉΓòÉΓòÉ 4.5.8. flushleft ΓòÉΓòÉΓòÉ
\begin{flushleft}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{flushleft}
The flushleft environment allows you to create a paragraph consisting of lines
that are flushed left, to the left-hand margin. Each line must be terminated
with the string \\.
\raggedright
ΓòÉΓòÉΓòÉ 4.5.8.1. \raggedright ΓòÉΓòÉΓòÉ
This declaration corresponds to the flushleft environment. This declaration
can be used inside an environment such as quote or in a parbox.
Unlike the flushleft environment, the \raggedright command does not start a
new paragraph; it simply changes how LaTeX formats paragraph units. To affect
a paragraph unit's format, the scope of the declaration must contain the blank
line or \end command (of an environment like quote) that ends the paragraph
unit.
ΓòÉΓòÉΓòÉ 4.5.9. flushright ΓòÉΓòÉΓòÉ
\begin{flushright}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{flushright}
The flushright environment allows you to create a paragraph consisting of
lines that are flushed right, to the right-hand margin. Each line must be
terminated with the string \\.
\raggedleft
ΓòÉΓòÉΓòÉ 4.5.9.1. \raggedleft ΓòÉΓòÉΓòÉ
This declaration corresponds to the flushright environment. This declaration
can be used inside an environment such as quote or in a parbox.
Unlike the flushright environment, the \raggedleft command does not start a
new paragraph; it simply changes how LaTeX formats paragraph units. To affect
a paragraph unit's format, the scope of the declaration must contain the blank
line or \end command (of an environment like quote) that ends the paragraph
unit.
ΓòÉΓòÉΓòÉ 4.5.10. itemize ΓòÉΓòÉΓòÉ
\begin{itemize}
\item First item
\item Second item
.
.
.
\end{itemize}
The itemize environment produces a ``bulleted'' list. Itemizations can be
nested within one another, up to four levels deep. They can also be nested
within other paragraph-making environments.
Each item of an itemized list begins with an \item command. There must be at
least one \item command within the environment.
The itemize environment uses the itemi through itemiv counters (see Counters).
The type of numbering can be changed by redefining \theitemi etc.
ΓòÉΓòÉΓòÉ 4.5.11. letter ΓòÉΓòÉΓòÉ
This environment is used for creating letters. See Letters.
ΓòÉΓòÉΓòÉ 4.5.12. list ΓòÉΓòÉΓòÉ
The list environment is a generic environment which is used for defining many
of the more specific environments. It is seldom used in documents, but often
in macros.
\begin{list}{label}{spacing}
\item First item
\item Second item
.
.
.
\end{list}
The {label} argument specifies how items should be labelled. This argument is
a piece of text that is inserted in a box to form the label. This argument
can and usually does contain other LaTeX commands.
The {spacing} argument contains commands to change the spacing parameters for
the list. This argument will most often be null, i.e., {}. This will select
all default spacing which should suffice for most cases.
ΓòÉΓòÉΓòÉ 4.5.13. minipage ΓòÉΓòÉΓòÉ
\begin{minipage}[position]{width}
text
\end{minipage}
The minipage environment is similar to a \parbox command. It takes the same
optional position argument and mandatory width argument. You may use other
paragraph-making environments inside a minipage.
Footnotes in a minipage environment are handled in a way that is particularly
useful for putting footnotes in figures or tables. A \footnote or
\footnotetext command puts the footnote at the bottom of the minipage instead
of at the bottom of the page, and it uses the mpfootnote counter instead of
the ordinary footnote counter See Counters.
NOTE: Don't put one minipage inside another if you are using footnotes; they
may wind up at the bottom of the wrong minipage.
ΓòÉΓòÉΓòÉ 4.5.14. picture ΓòÉΓòÉΓòÉ
\begin{picture}(width,height)(x offset,y offset)
.
.
picture commands
.
.
\end{picture}
The picture environment allows you to create just about any kind of picture
you want containing text, lines, arrows and circles. You tell LaTeX where to
put things in the picture by specifying their coordinates. A coordinate is a
number that may have a decimal point and a minus sign --- a number like 5, 2.3
or -3.1416. A coordinate specifies a length in multiples of the unit length
\unitlength, so if \unitlength has been set to 1cm, then the coordinate 2.54
specifies a length of 2.54 centimetres. You can change the value of
\unitlength anywhere you want, using the \setlength command, but strange
things will happen if you try changing it inside the picture environment.
A position is a pair of coordinates, such as (2.4,-5), specifying the point
with x-coordinate 2.4 and y-coordinate -5. Coordinates are specified in the
usual way with respect to an origin, which is normally at the lower-left
corner of the picture. Note that when a position appears as an argument, it
is not enclosed in braces; the parentheses serve to delimit the argument.
The picture environment has one mandatory argument, which is a position. It
specifies the size of the picture. The environment produces a rectangular box
with width and height determined by this argument's x- and y-coordinates.
The picture environment also has an optional position argument, following the
size argument, that can change the origin. (Unlike ordinary optional
arguments, this argument is not contained in square brackets.) The optional
argument gives the coordinates of the point at the lower-left corner of the
picture (thereby determining the origin). For example, if \unitlength has
been set to 1mm, the command
\begin{picture}(100,200)(10,20)
produces a picture of width 100 millimetres and height 200 millimetres, whose
lower-left corner is the point (10,20) and whose upper-right corner is
therefore the point (110,220). When you first draw a picture, you will omit
the optional argument, leaving the origin at the lower-left corner. If you
then want to modify your picture by shifting everything, you just add the
appropriate optional argument.
The environment's mandatory argument determines the nominal size of the
picture. This need bear no relation to how large the picture really is; LaTeX
will happily allow you to put things outside the picture, or even off the
page. The picture's nominal size is used by LaTeX in determining how much
room to leave for it.
Everything that appears in a picture is drawn by the \put command. The command
\put (11.3,-.3){┬╖┬╖┬╖}
puts the object specified by ┬╖┬╖┬╖ in the picture, with its reference point at
coordinates (11.3,-.3). The reference points for various objects will be
described below.
The \put command creates an LR box. You can put anything in the text argument
of the \put command that you'd put into the argument of an \mbox and related
commands. When you do this, the reference point will be the lower left corner
of the box.
Picture commands:
\circle
\dashbox
\frame
\framebox (picture)
\line
\linethickness
\makebox (picture)
\multiput
\oval
\put
\shortstack
\vector
ΓòÉΓòÉΓòÉ 4.5.14.1. \circle ΓòÉΓòÉΓòÉ
\circle[*]{diameter}
The \circle command produces a circle with a diameter as close to the
specified one as possible. If the *-form of the command is used, LaTeX draws
a solid circle.
Note that only circles up to 40 pt can be drawn.
ΓòÉΓòÉΓòÉ 4.5.14.2. \dashbox ΓòÉΓòÉΓòÉ
Draws a box with a dashed line.
\dashbox{dash_length}(width,height){┬╖┬╖┬╖}
The \dashbox has an extra argument which specifies the width of each dash. A
dashed box looks best when the width and height are multiples of the
dash_length.
ΓòÉΓòÉΓòÉ 4.5.14.3. \frame ΓòÉΓòÉΓòÉ
\frame{┬╖┬╖┬╖}
The \frame command puts a rectangular frame around the object specified in the
argument. The reference point is the bottom left corner of the frame. No
extra space is put between the frame and the object.
ΓòÉΓòÉΓòÉ 4.5.14.4. \framebox ΓòÉΓòÉΓòÉ
\framebox(width,height)[position]{┬╖┬╖┬╖}
The \framebox command is exactly the same as the \makebox command, except that
it puts a frame around the outside of the box that it creates.
The framebox command produces a rule of thickness \fboxrule, and leaves a
space \fboxsep between the rule and the contents of the box.
ΓòÉΓòÉΓòÉ 4.5.14.5. \line ΓòÉΓòÉΓòÉ
\line(x slope,y slope){length}
The \line command draws a line of the specified length and slope.
Note that LaTeX can only draw lines with slope = x/y, where x and y have
integer values from -6 through 6.
ΓòÉΓòÉΓòÉ 4.5.14.6. \linethickness ΓòÉΓòÉΓòÉ
\linethickness{dimension}
Declares the thickness of horizontal and vertical lines in a picture
environment to be dimension, which must be a positive length. It does not
affect the thickness of slanted lines and circles, or the quarter circles
drawn by \oval to form the corners of an oval.
ΓòÉΓòÉΓòÉ 4.5.14.7. \makebox ΓòÉΓòÉΓòÉ
\makebox(width,height)[position]{┬╖┬╖┬╖}
The \makebox command for the picture environment is similar to the normal
\makebox command except that you must specify a width and height in multiples
of \unitlength.
The optional argument, [position], specifies the quadrant that your text
appears in. You may select up to two of the following:
o t - Moves the item to the top of the rectangle
o b - Moves the item to the bottom
o l - Moves the item to the left
o r - Moves the item to the right
See \makebox.
ΓòÉΓòÉΓòÉ 4.5.14.8. \multiput ΓòÉΓòÉΓòÉ
\multiput(x coord,y coord)(delta x,delta y){number of copies}{object}
The \multiput command can be used when you are putting the same object in a
regular pattern across a picture.
ΓòÉΓòÉΓòÉ 4.5.14.9. \oval ΓòÉΓòÉΓòÉ
\oval(width,height)[portion]
The \oval command produces a rectangle with rounded corners. The optional
argument, [portion], allows you to select part of the oval.
o t - Selects the top portion
o b - Selects the bottom portion
o r - Selects the right portion
o l - Selects the left portion
Note that the ``corners'' of the oval are made with quarter circles with a
maximum radius of 20 pt, so large ``ovals'' will look more like boxes with
rounded corners.
ΓòÉΓòÉΓòÉ 4.5.14.10. \put ΓòÉΓòÉΓòÉ
\put(x coord,y coord){ ┬╖┬╖┬╖ }
The \put command places the item specified by the mandatory argument at the
given coordinates.
ΓòÉΓòÉΓòÉ 4.5.14.11. \shortstack ΓòÉΓòÉΓòÉ
\shortstack[position]{┬╖┬╖┬╖ \\ ┬╖┬╖┬╖ \\ ┬╖┬╖┬╖}
The \shortstack command produces a stack of objects. The valid positions are:
o r - Moves the objects to the right of the stack
o l - Moves the objects to the left of the stack
o c - Moves the objects to the centre of the stack (default)
ΓòÉΓòÉΓòÉ 4.5.14.12. \vector ΓòÉΓòÉΓòÉ
\vector(x slope,y slope){length}
The \vector command draws a line with an arrow of the specified length and
slope. The x and y values must lie between -4 and +4, inclusive.
ΓòÉΓòÉΓòÉ 4.5.15. quotation ΓòÉΓòÉΓòÉ
\begin{quotation}
text
\end{quotation}
The margins of the quotation environment are indented on the left and the
right. The text is justified at both margins and there is paragraph
indentation. Leaving a blank line between text produces a new paragraph.
ΓòÉΓòÉΓòÉ 4.5.16. quote ΓòÉΓòÉΓòÉ
\begin{quote}
text
\end{quote}
The margins of the quote environment are indented on the left and the right.
The text is justified at both margins. Leaving a blank line between text
produces a new paragraph.
ΓòÉΓòÉΓòÉ 4.5.17. tabbing ΓòÉΓòÉΓòÉ
\begin{tabbing}
text \= more text \= still more text \= last text \\
second row \> \> more \\
.
.
.
\end{tabbing}
The tabbing environment provides a way to align text in columns. It works by
setting tab stops and tabbing to them much the way you do with an ordinary
typewriter.
It is best suited for cases where the width of each column is constant and
known in advance.
This environment can be broken across pages, unlike the tabular environment.
The following commands can be used inside a tabbing enviroment:
\=
Sets a tab stop at the current position.
\>
Advances to the next tab stop.
\<
This command allows you to put something to the left of the local
margin without changing the margin. Can only be used at the start of
the line.
\+
Moves the left margin of the next and all the following commands one
tab stop to the right.
\-
Moves the left margin of the next and all the following commands one
tab stop to the left.
\'
Moves everything that you have typed so far in the current column,
i.e. everything from the most recent \>, \<, \', \\, or \kill
command, to the right of the previous column, flush against the
current column's tab stop.
\`
Allows you to put text flush right against any tab stop, including
tab stop 0. However, it can't move text to the right of the last
column because there's no tab stop there. The \` command moves all
the text that follows it, up to the \\ or \end{tabbing} command that
ends the line, to the right margin of the tabbing environment.
There must be no \> or \' command between the \` and the command
that ends the line.
\kill
Sets tab stops without producing text. Works just like \\ except
that it throws away the current line instead of producing output for
it. The effect of any \=, \+ or \- commands in that line remain in
effect.
\pushtabs
Saves all current tab stop positions. Useful for temporarily
changing tab stop positions in the middle of a tabbing environment.
\pushtabs
Restores the tab stop positions saved by the last \pushtabs.
\a
In a tabbing environment, the commands \=, \' and \` do not produce
accents as normal. Instead, the commands \a=, \a' and \a` are used.
This example typesets a Pascal function in a traditional format:
\begin{tabbing}
function \= fact(n : integer) : integer;\\
\> begin \= \+ \\
\> if \= n $>$ 1 then \+ \\
fact := n * fact(n-1) \- \\
else \+ \\
fact := 1; \-\- \\
end;\\
\end{tabbing}
ΓòÉΓòÉΓòÉ 4.5.18. table ΓòÉΓòÉΓòÉ
\begin{table}[placement]
body of the table
\caption{table title}
\end{table}
Tables are objects that are not part of the normal text, and are usually
``floated'' to a convenient place, like the top of a page. Tables will
not be split between two pages.
The optional argument [placement] determines where LaTeX will try to place
your table. There are four places where LaTeX can possibly put a float:
o h : Here - at the position in the text where the table environment appears.
o t : Top - at the top of a text page.
o b : Bottom - at the bottom of a text page.
o p : Page of floats - on a separate float page, which is a page containing no
text, only floats.
The standard report and article classes use the default placement [tbp].
The body of the table is made up of whatever text, LaTeX commands, etc., you
wish. The \caption command allows you to title your table.
ΓòÉΓòÉΓòÉ 4.5.19. tabular ΓòÉΓòÉΓòÉ
\begin{tabular}[pos]{cols}
column 1 entry & column 2 entry ┬╖┬╖┬╖ & column n entry \\
.
.
.
\end{tabular}
or
\begin{tabular*}{width}[pos]{cols}
column 1 entry & column 2 entry ┬╖┬╖┬╖ & column n entry \\
.
.
.
\end{tabular*}
These environments produce a box consisting of a sequence of rows of items,
aligned vertically in columns. The mandatory and optional arguments consist
of:
width Specifies the width of the tabular* environment. There must be
rubber space between columns that can stretch to fill out the
specified width.
pos Specifies the vertical position; default is alignment on the centre
of the environment.
1. t - align on top row
2. b - align on bottom row
cols Specifies the column formatting. It consists of a sequence of the
following specifiers, corresponding to the sequence of columns and
intercolumn material.
1. l - A column of left-aligned items.
2. r - A column of right-aligned items.
3. c - A column of centred items.
4. | - A vertical line the full height and depth of the
environment.
5. @{text} - This inserts text in every row. An @-expression
suppresses the intercolumn space normally inserted between
columns; any desired space between the inserted text and the
adjacent items must be included in text. An \extracolsep{wd}
command in an @-expression causes an extra space of width wd
to appear to the left of all subsequent columns, until
countermanded by another \extracolsep command. Unlike
ordinary intercolumn space, this extra space is not
suppressed by an @-expression. An \extracolsep command can
be used only in an @-expression in the cols argument.
6. p{wd} - Produces a column with each item typeset in a parbox
of width wd, as if it were the argument of a \parbox[t]{wd}
command. However, a \\ may not appear in the item, except in
the following situations:
. inside an environment like minipage, array, or tabular.
. inside an explicit \parbox.
. in the scope of a \centering, \raggedright, or
\raggedleft declaration. The latter declarations must
appear inside braces or an environment when used in a
p-column element.
7. *{num}{cols} - Equivalent to num copies of cols, where num is
any positive integer and cols is any list of
column-specifiers, which may contain another *-expression.
\cline
\hline
\multicolumn
\vline
ΓòÉΓòÉΓòÉ 4.5.19.1. \cline ΓòÉΓòÉΓòÉ
\cline{i-j}
The \cline command draws horizontal lines across the columns specified,
beginning in column i and ending in column j, which are identified in the
mandatory argument.
ΓòÉΓòÉΓòÉ 4.5.19.2. \hline ΓòÉΓòÉΓòÉ
The \hline command will draw a horizontal line the width of the table. It's
most commonly used to draw a line at the top, bottom, and between the rows of
the table.
ΓòÉΓòÉΓòÉ 4.5.19.3. \multicolumn ΓòÉΓòÉΓòÉ
\multicolumn{cols}{pos}{text}
The \multicolumn is used to make an entry that spans several columns. The
first mandatory argument, cols, specifies the number of columns to span. The
second mandatory argument, pos, specifies the formatting of the entry; c for
centred, l for flushleft, r for flushright. The third mandatory argument,
text, specifies what text is to make up the entry.
ΓòÉΓòÉΓòÉ 4.5.19.4. \vline ΓòÉΓòÉΓòÉ
The \vline command will draw a vertical line extending the full height and
depth of its row. An \hfill command can be used to move the line to the edge
of the column. It can also be used in an @-expression.
ΓòÉΓòÉΓòÉ 4.5.20. thebibliography ΓòÉΓòÉΓòÉ
\begin{thebibliography}{widest-label}
\bibitem[label]{cite_key}
.
.
.
\end{thebibliography}
The thebibliography environment produces a bibliography or reference list. In
the article class, this reference list is labelled ``References''; in the
report class, it is labelled ``Bibliography''.
o widest-label: Text that, when printed, is approximately as wide as the
widest item label produces by the \bibitem commands.
\bibitem
\cite
\nocite
Using BibTeX
ΓòÉΓòÉΓòÉ 4.5.20.1. \bibitem ΓòÉΓòÉΓòÉ
\bibitem[label]{cite_key}
The \bibitem command generates an entry labelled by label. If the label
argument is missing, a number is generated as the label, using the enumi
counter. The cite_key is any sequence of letters, numbers, and punctuation
symbols not containing a comma. This command writes an entry on the '.aux'
file containing cite_key and the item's label. When this '.aux' file is read
by the \begin{document} command, the item's label is associated with cite_key,
causing the reference to cite_key by a \cite command to produce the associated
label.
ΓòÉΓòÉΓòÉ 4.5.20.2. \cite ΓòÉΓòÉΓòÉ
\cite[text]{key_list}
The key_list argument is a list of citation keys. This command generates an
in-text citation to the references associated with the keys in key_list by
entries on the '.aux' file read by the \begin{document} command.
The optional text argument will appear after the citation, i.e. \cite[p.
2]{knuth} might produce `[Knuth, p. 2]'.
ΓòÉΓòÉΓòÉ 4.5.20.3. \nocite ΓòÉΓòÉΓòÉ
\nocite{key_list}
The \nocite command produces no text, but writes key_list, which is a list of
one or more citation keys, on the '.aux' file.
ΓòÉΓòÉΓòÉ 4.5.20.4. Using BibTeX ΓòÉΓòÉΓòÉ
If you use the BibTeX program by Oren Patashnik (highly recommended if you
need a bibliography of more than a couple of titles) to maintain your
bibliography, you don't use the thebibliography environment. Instead, you
include the lines
\bibliographystyle{style}
\bibliography{bibfile}
where style refers to a file style.bst, which defines how your citations will
look. The standard styles distributed with BibTeX are:
alpha Sorted alphabetically. Labels are formed from name of author and
year of publication.
plain Sorted alphabetically. Labels are numeric.
unsrt Like plain, but entries are in order of citation.
abbrv Like plain, but more compact labels.
In addition, numerous other BibTeX style files exist tailored to the demands
of various publications.
The argument to \bibliography refers to the file bibfile.bib, which should
contain your database in BibTeX format. Only the entries referred to via \cite
and \nocite will be listed in the bibliography.
ΓòÉΓòÉΓòÉ 4.5.21. theorem ΓòÉΓòÉΓòÉ
\begin{theorem}
theorem text
\end{theorem}
The theorem environment produces ``Theorem x'' in boldface followed by your
theorem text.
ΓòÉΓòÉΓòÉ 4.5.22. titlepage ΓòÉΓòÉΓòÉ
\begin{titlepage}
text
\end{titlepage}
The titlepage environment creates a title page, i.e. a page with no printed
page number or heading. It also causes the following page to be numbered page
one. Formatting the title page is left to you. The \today command comes in
handy for title pages.
Note that you can use the \maketitle (see \maketitle) command to produce a
standard title page.
ΓòÉΓòÉΓòÉ 4.5.23. verbatim ΓòÉΓòÉΓòÉ
\begin{verbatim}
text
\end{verbatim}
The verbatim environment is a paragraph-making environment that gets LaTeX to
print exactly what you type in. It turns LaTeX into a typewriter with
carriage returns and blanks having the same effect that they would on a
typewriter.
\verb
ΓòÉΓòÉΓòÉ 4.5.23.1. \verb ΓòÉΓòÉΓòÉ
\verb char literal_text char
\verb*char literal_text char
Typesets literal_text exactly as typed, including special characters and
spaces, using a typewriter (\tt) type style. There may be no space between
\verb or \verb* and char (space is shown here only for clarity). The *-form
differs only in that spaces are printed as a special character. as `\verb*|
|'.
ΓòÉΓòÉΓòÉ 4.5.24. verse ΓòÉΓòÉΓòÉ
\begin{verse}
text
\end{verse}
The verse environment is designed for poetry, though you may find other uses
for it.
The margins are indented on the left and the right. Separate the lines of each
stanza with \\, and use one or more blank lines to separate the stanzas.
ΓòÉΓòÉΓòÉ 4.6. Footnotes ΓòÉΓòÉΓòÉ
Footnotes can be produced in one of two ways. They can be produced with one
command, the \footnote command. They can also be produced with two commands,
the \footnotemark and the \footnotetext commands. See the specific command
for information on why you would use one over the other.
\footnote
\footnotemark
\footnotetext
ΓòÉΓòÉΓòÉ 4.6.1. \footnote ΓòÉΓòÉΓòÉ
\footnote[number]{text}
The \footnote command places the numbered footnote text at the bottom of the
current page. The optional argument, number, is used to change the default
footnote number. This command can only be used in outer paragraph mode; i.e.,
you cannot use it in sectioning commands like \chapter, in figures, tables or
in a tabular environment.
ΓòÉΓòÉΓòÉ 4.6.2. \footnotemark ΓòÉΓòÉΓòÉ
The \footnotemark command puts the footnote number in the text. This command
can be used in inner paragraph mode. The text of the footnote is supplied by
the \footnotetext command.
This command can be used to produce several consecutive footnote markers
referring to the same footnote by using
\footnotemark[\value{footnote}]
after the first \footnote command.
ΓòÉΓòÉΓòÉ 4.6.3. \footnotetext ΓòÉΓòÉΓòÉ
\footnotetext[number]{text}
The \footnotetext command produces the text to be placed at the bottom of the
page. This command can come anywhere after the \footnotemark command. The
\footnotetext command must appear in outer paragraph mode.
The optional argument, number, is used to change the default footnote number.
ΓòÉΓòÉΓòÉ 4.7. Lengths ΓòÉΓòÉΓòÉ
A length is a measure of distance. Many LaTeX commands take a length as an
argument.
\newlength
\setlength
\addtolength
\settodepth
\settoheight
\settowidth
Predefined lengths
ΓòÉΓòÉΓòÉ 4.7.1. \newlength ΓòÉΓòÉΓòÉ
\newlength{\gnat}
The \newlength command defines the mandatory argument, \gnat, as a length
command with a value of 0in. An error occurs if a \gnat command already
exists.
ΓòÉΓòÉΓòÉ 4.7.2. \setlength ΓòÉΓòÉΓòÉ
\setlength{\gnat}{length}
The \setlength command is used to set the value of a length command. The
length argument can be expressed in any terms of length LaTeX understands,
i.e., inches (in), millimetres (mm), points (pt), etc.
ΓòÉΓòÉΓòÉ 4.7.3. \addtolength ΓòÉΓòÉΓòÉ
\addtolength{\gnat}{length}
The \addtolength command increments a ``length command'' by the amount
specified in the length argument. It can be a negative amount.
ΓòÉΓòÉΓòÉ 4.7.4. \settodepth ΓòÉΓòÉΓòÉ
\settodepth{\gnat}{text}
The \settodepth command sets the value of a length command equal to the depth
of the text argument.
ΓòÉΓòÉΓòÉ 4.7.5. \settoheight ΓòÉΓòÉΓòÉ
\settoheight{\gnat}{text}
The \settoheight command sets the value of a length command equal to the
height of the text argument.
ΓòÉΓòÉΓòÉ 4.7.6. \settowidth ΓòÉΓòÉΓòÉ
\settowidth{\gnat}{text}
The \settowidth command sets the value of a length command equal to the width
of the text argument.
ΓòÉΓòÉΓòÉ 4.7.7. Predefined lengths ΓòÉΓòÉΓòÉ
\width
\height
\depth
\totalheight
These length parameters can be used in the arguments of the box-making
commands See Spaces & Boxes. They specify the natural width etc. of the text
in the box. \totalheight equals \height + \depth. To make a box with the text
stretched to double the natural size, e.g., say
\makebox[2\width]{Get a stretcher}
ΓòÉΓòÉΓòÉ 4.8. Letters ΓòÉΓòÉΓòÉ
You can use LaTeX to typeset letters, both personal and business. The letter
document class is designed to make a number of letters at once, although you
can make just one if you so desire.
Your '.tex' source file has the same minimum commands as the other document
classes, i.e., you must have the following commands as a minimum:
\documentclass{letter}
\begin{document}
┬╖┬╖┬╖ letters ┬╖┬╖┬╖
\end{document}
Each letter is a letter environment, whose argument is the name and address of
the recipient. For example, you might have:
\begin{letter}{Mr. Joe Smith\\ 2345 Princess St.
\\ Edinburgh, EH1 1AA}
┬╖┬╖┬╖
\end{letter}
The letter itself begins with the \opening command. The text of the letter
follows. It is typed as ordinary LaTeX input. Commands that make no sense in
a letter, like \chapter, do not work. The letter closes with a \closing
command.
After the closing, you can have additional material. The \cc command produces
the usual ``cc: ┬╖┬╖┬╖''. There's also a similar \encl command for a list of
enclosures. With both these commands, use \\ to separate the items.
\ps is meant for adding a postscript.
If you issue the \makelabels command in the preamble, LaTeX will create a
sheet of address labels.
\opening
\closing
Declarations
ΓòÉΓòÉΓòÉ 4.8.1. \opening ΓòÉΓòÉΓòÉ
\opening{text}
The letter begins with the \opening command. The mandatory argument, text, is
whatever text you wish to start your letter, i.e.,
\opening{Dear Joe,}
ΓòÉΓòÉΓòÉ 4.8.2. \closing ΓòÉΓòÉΓòÉ
\closing{text}
The letter closes with a \closing command, i.e.,
\closing{Best Regards,}
ΓòÉΓòÉΓòÉ 4.8.3. Declarations ΓòÉΓòÉΓòÉ
The following commands are declarations which take a single argument.
\address
\signature
\location
\telephone
ΓòÉΓòÉΓòÉ 4.8.4. \address ΓòÉΓòÉΓòÉ
\address{Return address}
The return address, as it should appear on the letter and the envelope.
Separate lines of the address should be separated by \\ commands. If you do
not make an \address declaration, then the letter will be formatted for
copying onto your organisation's standard letterhead. (See Overview, for
details on your local implementation). If you give an \address declaration,
then the letter will be formatted as a personal letter.
ΓòÉΓòÉΓòÉ 4.8.5. \signature ΓòÉΓòÉΓòÉ
\signature{Your name}
Your name, as it should appear at the end of the letter underneath the space
for your signature. Items that should go on separate lines should be
separated by \\ commands.
ΓòÉΓòÉΓòÉ 4.8.6. \location ΓòÉΓòÉΓòÉ
\location{address}
This modifies your organisation's standard address. This only appears if the
firstpage pagestyle is selected.
ΓòÉΓòÉΓòÉ 4.8.7. \telephone ΓòÉΓòÉΓòÉ
\telephone{number}
This is your telephone number. This only appears if the firstpage pagestyle
is selected.
ΓòÉΓòÉΓòÉ 4.9. Line & Page Breaking ΓòÉΓòÉΓòÉ
The first thing LaTeX does when processing ordinary text is to translate your
input file into a string of glyphs and spaces. To produce a printed document,
this string must be broken into lines, and these lines must be broken into
pages. In some environments, you do the line breaking yourself with the \\
command, but LaTeX usually does it for you.
\\
\- (hyphenation)
\cleardoublepage
\clearpage
\enlargethispage
\fussy
\hyphenation
\linebreak
\newline
\newpage
\nolinebreak
\nopagebreak
\pagebreak
\sloppy
ΓòÉΓòÉΓòÉ 4.9.1. \\ ΓòÉΓòÉΓòÉ
\\[*][extra-space]
The \\ command tells LaTeX to start a new line. It has an optional argument,
extra-space, that specifies how much extra vertical space is to be inserted
before the next line. This can be a negative amount.
The \\* command is the same as the ordinary \\ command except that it tells
LaTeX not to start a new page after the line.
ΓòÉΓòÉΓòÉ 4.9.2. \- ΓòÉΓòÉΓòÉ
The \- command tells LaTeX that it may hyphenate the word at that point.
LaTeX is very good at hyphenating, and it will usually find all correct
hyphenation points. The \- command is used for the exceptional cases.
Note that when you insert \- commands in a word, the word will only be
hyphenated at those points and not at any of the hyphenation points that LaTeX
might otherwise have chosen.
ΓòÉΓòÉΓòÉ 4.9.3. \cleardoublepage ΓòÉΓòÉΓòÉ
The \cleardoublepage command ends the current page and causes all figures and
tables that have so far appeared in the input to be printed. In a two-sided
printing style, it also makes the next page a right-hand (odd-numbered) page,
producing a blank page if necessary.
ΓòÉΓòÉΓòÉ 4.9.4. \clearpage ΓòÉΓòÉΓòÉ
The \clearpage command ends the current page and causes all figures and tables
that have so far appeared in the input to be printed.
ΓòÉΓòÉΓòÉ 4.9.5. \enlargethispage ΓòÉΓòÉΓòÉ
\enlargethispage{size}
\enlargethispage*{size}
Enlarge the \textheight for the current page by the specified amount; e.g.
\enlargethispage{\baselineskip} will allow one additional line.
The starred form tries to squeeze the material together on the page as much as
possible. This is normally used together with an explicit \pagebreak.
\fussy
This declaration (which is the default) makes TeX more fussy about line
breaking. This can avoids too much space between words, but may produce
overfull boxes.
This command cancels the effect of a previous \sloppy command.
ΓòÉΓòÉΓòÉ 4.9.6. \hyphenation ΓòÉΓòÉΓòÉ
\hyphenation{words}
The \hyphenation command declares allowed hyphenation points, where words is a
list of words, separated by spaces, in which each hyphenation point is
indicated by a - character.
ΓòÉΓòÉΓòÉ 4.9.7. \linebreak ΓòÉΓòÉΓòÉ
\linebreak[number]
The \linebreak command tells LaTeX to break the current line at the point of
the command. With the optional argument, number, you can convert the
\linebreak command from a demand to a request. The number must be a number
from 0 to 4. The higher the number, the more insistent the request is.
The \linebreak command causes LaTeX to stretch the line so it extends to the
right margin.
ΓòÉΓòÉΓòÉ 4.9.8. \newline ΓòÉΓòÉΓòÉ
The \newline command breaks the line right where it is. It can only be used in
paragraph mode.
ΓòÉΓòÉΓòÉ 4.9.9. \newpage ΓòÉΓòÉΓòÉ
The \newpage command ends the current page.
ΓòÉΓòÉΓòÉ 4.9.10. \nolinebreak ΓòÉΓòÉΓòÉ
\nolinebreak[number]
The \nolinebreak command prevents LaTeX from breaking the current line at the
point of the command. With the optional argument, number, you can convert the
\nolinebreak command from a demand to a request. The number must be a number
from 0 to 4. The higher the number, the more insistent the request is.
ΓòÉΓòÉΓòÉ 4.9.11. \nopagebreak ΓòÉΓòÉΓòÉ
\nopagebreak[number]
The \nopagebreak command prevents LaTeX from breaking the current page at the
point of the command. With the optional argument, number, you can convert the
\nopagebreak command from a demand to a request. The number must be a number
from 0 to 4. The higher the number, the more insistent the request is.
ΓòÉΓòÉΓòÉ 4.9.12. \pagebreak ΓòÉΓòÉΓòÉ
\pagebreak[number]
The \pagebreak command tells LaTeX to break the current page at the point of
the command. With the optional argument, number, you can convert the
\pagebreak command from a demand to a request. The number must be a number
from 0 to 4. The higher the number, the more insistent the request is.
\sloppy
This declaration makes TeX less fussy about line breaking. This can prevent
overfull boxes, but may leave too much space between words.
Lasts until a \fussy command is issued.
ΓòÉΓòÉΓòÉ 4.10. Making Paragraphs ΓòÉΓòÉΓòÉ
A paragraph is ended by one or more completely blank lines --- lines not
containing even a %. A blank line should not appear where a new paragraph
cannot be started, such as in math mode or in the argument of a sectioning
command.
\indent
\noindent
\par
ΓòÉΓòÉΓòÉ 4.10.1. \indent ΓòÉΓòÉΓòÉ
\indent
This produces a horizontal space whose width equals the width of the paragraph
indentation. It is used to add paragraph indentation where it would otherwise
be suppressed.
ΓòÉΓòÉΓòÉ 4.10.2. \noindent ΓòÉΓòÉΓòÉ
\noindent
When used at the beginning of the paragraph, it suppresses the paragraph
indentation. It has no effect when used in the middle of a paragraph.
ΓòÉΓòÉΓòÉ 4.10.3. \par ΓòÉΓòÉΓòÉ
Equivalent to a blank line; often used to make command or environment
definitions easier to read.
ΓòÉΓòÉΓòÉ 4.11. Margin Notes ΓòÉΓòÉΓòÉ
The command \marginpar[left]{right} creates a note in the margin. The first
line will be at the same height as the line in the text where the \marginpar
occurs.
When you only specify the mandatory argument right, the text will be placed
o in the right margin for one-sided layout
o in the outside margin for two-sided layout
o in the nearest margin for two-column layout.
By issuing the command \reversemarginpar, you can force the marginal notes to
go into the opposite (inside) margin.
When you specify both arguments, left is used for the left margin, and right
is used for the right margin.
The first word will normally not be hyphenated; you can enable hyphenation by
prefixing the first word with a \hspace{0pt} command.
ΓòÉΓòÉΓòÉ 4.12. Math Formulae ΓòÉΓòÉΓòÉ
There are three environments that put LaTeX in math mode:
math For Formulae that appear right in the text.
displaymathFor Formulae that appear on their own line.
equation The same as the displaymath environment except that it adds an
equation number in the right margin.
The math environment can be used in both paragraph and LR mode, but the
displaymath and equation environments can be used only in paragraph mode. The
math and displaymath environments are used so often that they have the
following short forms:
\(┬╖┬╖┬╖\) instead of \begin{math}┬╖┬╖┬╖\end{math}
\[┬╖┬╖┬╖\] instead of \begin{displaymath}┬╖┬╖┬╖\end{displaymath}
In fact, the math environment is so common that it has an even shorter form:
$ ┬╖┬╖┬╖ $ instead of \(┬╖┬╖┬╖\)
Subscripts & Superscripts
Math Symbols
Spacing in Math Mode
Math Miscellany
ΓòÉΓòÉΓòÉ 4.12.1. Subscripts & Superscripts ΓòÉΓòÉΓòÉ
To get an expression exp to appear as a subscript, you just type _{exp}. To
get exp to appear as a superscript, you type ^{exp}. LaTeX handles
superscripted superscripts and all of that stuff in the natural way. It even
does the right thing when something has both a subscript and a superscript.
ΓòÉΓòÉΓòÉ 4.12.2. Math Symbols ΓòÉΓòÉΓòÉ
LaTeX provides almost any mathematical symbol you're likely to need. The
commands for generating them can be used only in math mode. For example, if
you include $\pi$ in your source, you will get the symbol ``pi'' in your
output.
LaTeX provides almost any mathematical symbol you're likely to need. The
commands for generating them can be used only in math mode. For example, if
you include $\pi$ in your source, you will get the symbol in your output.
ΓòÉΓòÉΓòÉ 4.12.3. Spacing in Math Mode ΓòÉΓòÉΓòÉ
In a math environment, LaTeX ignores the spaces you type and puts in the
spacing that it thinks is best. LaTeX formats mathematics the way it's done
in mathematics texts. If you want different spacing, LaTeX provides the
following four commands for use in math mode:
1. \; - a thick space
2. \: - a medium space
3. \, - a thin space
4. \! - a negative thin space
ΓòÉΓòÉΓòÉ 4.12.4. Math Miscellany ΓòÉΓòÉΓòÉ
\cdots Produces a horizontal ellipsis where the dots are raised to the
centre of the line.
eg.
\ddots Produces a diagonal ellipsis.
eg.
\frac{num}{den}Produces the fraction num divided by den.
eg.
\ldots Produces an ellipsis. This command works in any mode, not just math
mode.
eg.
\overbrace{text}Generates a brace over text.
eg.
\overline{text}Causes the argument text to be overlined.
eg.
\sqrt[root]{arg}Produces the square root of its argument. The optional
argument, root, determines what root to produce, i.e., the cube root
of x+y would be typed as $\sqrt[3]{x+y}$.
eg.
\underbrace{text}Generates text with a brace underneath.
eg.
\underline{text}Causes the argument text to be underlined. This command can
also be used in paragraph and LR modes.
eg.
\vdots Produces a vertical ellipsis.
eg.
ΓòÉΓòÉΓòÉ 4.13. Modes ΓòÉΓòÉΓòÉ
When LaTeX is processing your input text, it is always in one of three modes:
o Paragraph mode
o Math mode
o Left-to-right mode, called LR mode for short
LaTeX changes mode only when it goes up or down a staircase to a different
level, though not all level changes produce mode changes. Mode changes occur
only when entering or leaving an environment, or when LaTeX is processing the
argument of certain text-producing commands.
``Paragraph mode'' is the most common; it's the one LaTeX is in when
processing ordinary text. In that mode, LaTeX breaks your text into lines and
breaks the lines into pages. LaTeX is in ``math mode'' when it's generating a
mathematical formula. In ``LR mode'', as in paragraph mode, LaTeX considers
the output that it produces to be a string of words with spaces between them.
However, unlike paragraph mode, LaTeX keeps going from left to right; it never
starts a new line in LR mode. Even if you put a hundred words into an \mbox,
LaTeX would keep typesetting them from left to right inside a single box, and
then complain because the resulting box was too wide to fit on the line.
LaTeX is in LR mode when it starts making a box with an \mbox command. You
can get it to enter a different mode inside the box - for example, you can
make it enter math mode to put a formula in the box. There are also several
text-producing commands and environments for making a box that put LaTeX in
paragraph mode. The box make by one of these commands or environments will be
called a parbox. When LaTeX is in paragraph mode while making a box, it is
said to be in ``inner paragraph mode''. Its normal paragraph mode, which it
starts out in, is called ``outer paragraph mode''.
ΓòÉΓòÉΓòÉ 4.14. Page Styles ΓòÉΓòÉΓòÉ
The \documentclass command determines the size and position of the page's head
and foot. The page style determines what goes in them.
\maketitle
\pagenumbering
\pagestyle
\thispagestyle
ΓòÉΓòÉΓòÉ 4.14.1. \maketitle ΓòÉΓòÉΓòÉ
\maketitle
The \maketitle command generates a title on a separate title page - except in
the article class, where the title normally goes at the top of the first page.
Information used to produce the title is obtained from the following
declarations:
See Page Styles for the commands to give the information.
\author
\date
\thanks
\title
ΓòÉΓòÉΓòÉ 4.14.2. \author ΓòÉΓòÉΓòÉ
\author{names}
The \author command declares the author(s), where names is a list of authors
separated by \and commands. Use \\ to separate lines within a single author's
entry -- for example, to give the author's institution or address.
ΓòÉΓòÉΓòÉ 4.14.3. \date ΓòÉΓòÉΓòÉ
\date{text}
The \date command declares text to be the document's date. With no \date
command, the current date is used.
ΓòÉΓòÉΓòÉ 4.14.4. \thanks ΓòÉΓòÉΓòÉ
\thanks{text}
The \thanks command produces a \footnote to the title.
ΓòÉΓòÉΓòÉ 4.14.5. \title ΓòÉΓòÉΓòÉ
\title{text}
The \title command declares text to be the title. Use \\ to tell LaTeX where
to start a new line in a long title.
ΓòÉΓòÉΓòÉ 4.14.6. \pagenumbering ΓòÉΓòÉΓòÉ
\pagenumbering{num_style}
Specifies the style of page numbers. Possible values of num_style are:
o arabic - Arabic numerals
o roman - Lowercase Roman numerals
o Roman - Uppercase Roman numerals
o alph - Lowercase letters
o Alph - Uppercase letters
ΓòÉΓòÉΓòÉ 4.14.7. \pagestyle ΓòÉΓòÉΓòÉ
\pagestyle{option}
The \pagestyle command changes the style from the current page on throughout
the remainder of your document.
The valid options are:
o plain - Just a plain page number.
o empty - Produces empty heads and feet - no page numbers.
o headings - Puts running headings on each page. The document style specifies
what goes in the headings.
o myheadings - You specify what is to go in the heading with the \markboth or
the \markright commands.
\mark
ΓòÉΓòÉΓòÉ 4.14.8. \mark ΓòÉΓòÉΓòÉ
\markboth{left head}{right head}
\markright{right head}
The \markboth and \markright commands are used in conjunction with the page
style myheadings for setting either both or just the right heading. In
addition to their use with the myheadings page style, you can use them to
override the normal headings in the headings style, since LaTeX uses these
same commands to generate those heads. You should note that a ``left-hand
heading'' is generated by the last \markboth command before the end of the
page, while a ``right-hand heading'' is generated by the first \markboth or
\markright that comes on the page if there is one, otherwise by the last one
before the page.
ΓòÉΓòÉΓòÉ 4.14.9. \thispagestyle ΓòÉΓòÉΓòÉ
\thispagestyle{option}
The \thispagestyle command works in the same manner as the \pagestyle command
except that it changes the style for the current page only.
ΓòÉΓòÉΓòÉ 4.15. Sectioning ΓòÉΓòÉΓòÉ
Sectioning commands provide the means to structure your text into units.
o \part
o \chapter (report and book class only)
o \section
o \subsection
o \subsubsection
o \paragraph
o \subparagraph
All sectioning commands take the same general form, i.e.,
\chapter[optional]{title}
In addition to providing the heading in the text, the mandatory argument of
the sectioning command can appear in two other places:
1. The table of contents
2. The running head at the top of the page
You may not want the same thing to appear in these other two places as appears
in the text heading. To handle this situation, the sectioning commands have
an optional argument that provides the text for these other two purposes.
All sectioning commands have *-forms that print a title, but do not include a
number and do not make an entry in the table of contents.
\appendix
ΓòÉΓòÉΓòÉ 4.15.1. \appendix ΓòÉΓòÉΓòÉ
\appendix
The \appendix command changes the way sectional units are numbered. The
\appendix command generates no text and does not affect the numbering of
parts.
ΓòÉΓòÉΓòÉ 4.16. Spaces & Boxes ΓòÉΓòÉΓòÉ
All the predefined length parameters See Predefined lengths can be used in the
arguments of the box-making commands.
Horizontal space
\dotfill
\hfill
\hrulefill
\hspace Vertical space
\addvspace
\bigskip
\medskip
\smallskip
\vfill
\vspace Boxes
\fbox
\framebox
lrbox
\makebox
\mbox
\newsavebox
\parbox
\raisebox
\rule
\savebox
\usebox
ΓòÉΓòÉΓòÉ 4.16.1. \addvspace ΓòÉΓòÉΓòÉ
\addvspace{length}
The \addvspace command normally adds a vertical space of height length.
However, if vertical space has already been added to the same point in the
output by a previous \addvspace command, then this command will not add more
space than needed to make the natural length of the total vertical space equal
to length.
ΓòÉΓòÉΓòÉ 4.16.2. \bigskip ΓòÉΓòÉΓòÉ
The \bigskip command is equivalent to \vspace{bigskipamount} where
bigskipamount is determined by the document class.
ΓòÉΓòÉΓòÉ 4.16.3. \dotfill ΓòÉΓòÉΓòÉ
The \dotfill command produces a ``rubber length'' that produces dots instead
of just spaces.
ΓòÉΓòÉΓòÉ 4.16.4. \fbox ΓòÉΓòÉΓòÉ
\fbox{text}
The \fbox command is exactly the same as the \mbox command, except that it
puts a frame around the outside of the box that it creates.
ΓòÉΓòÉΓòÉ 4.16.5. \framebox ΓòÉΓòÉΓòÉ
\framebox[width][position]{text}
The \framebox command is exactly the same as the \makebox command, except that
it puts a frame around the outside of the box that it creates.
The framebox command produces a rule of thickness \fboxrule, and leaves a
space \fboxsep between the rule and the contents of the box.
ΓòÉΓòÉΓòÉ 4.16.6. \hfill ΓòÉΓòÉΓòÉ
The \hfill fill command produces a ``rubber length'' which can stretch or
shrink horizontally. It will be filled with spaces.
ΓòÉΓòÉΓòÉ 4.16.7. \hrulefill ΓòÉΓòÉΓòÉ
The \hrulefill fill command produces a ``rubber length'' which can stretch or
shrink horizontally. It will be filled with a horizontal rule.
ΓòÉΓòÉΓòÉ 4.16.8. \hspace ΓòÉΓòÉΓòÉ
\hspace[*]{length}
The \hspace command adds horizontal space. The length of the space can be
expressed in any terms that LaTeX understands, i.e., points, inches, etc. You
can add negative as well as positive space with an \hspace command. Adding
negative space is like backspacing.
LaTeX removes horizontal space that comes at the end of a line. If you don't
want LaTeX to remove this space, include the optional * argument. Then the
space is never removed.
ΓòÉΓòÉΓòÉ 4.16.9. lrbox ΓòÉΓòÉΓòÉ
\begin{lrbox}{cmd} text \end{lrbox}
This is the environment form of \sbox.
The text inside the environment is saved in the box cmd, which must have been
declared with \newsavebox.
ΓòÉΓòÉΓòÉ 4.16.10. \makebox ΓòÉΓòÉΓòÉ
\makebox[width][position]{text}
The \makebox command creates a box just wide enough to contain the text
specified. The width of the box is specified by the optional width argument.
The position of the text within the box is determined by the optional position
argument.
o c --- centred (default)
o l --- flushleft
o r --- flushright
o s --- stretch from left to right margin. The text must contain stretchable
space for this to work.
See \makebox (picture).
ΓòÉΓòÉΓòÉ 4.16.11. \mbox ΓòÉΓòÉΓòÉ
\mbox{text}
The \mbox command creates a box just wide enough to hold the text created by
its argument.
Use this command to prevent text from being split across lines.
ΓòÉΓòÉΓòÉ 4.16.12. \medskip ΓòÉΓòÉΓòÉ
The \medskip command is equivalent to \vspace{medskipamount} where
medskipamount is determined by the document class.
ΓòÉΓòÉΓòÉ 4.16.13. \newsavebox ΓòÉΓòÉΓòÉ
\newsavebox{cmd}
Declares cmd, which must be a command name that is not already defined, to be
a bin for saving boxes.
ΓòÉΓòÉΓòÉ 4.16.14. \parbox ΓòÉΓòÉΓòÉ
\parbox[position][height][inner-pos]{width}{text}
A parbox is a box whose contents are created in paragraph mode. The \parbox
has two mandatory arguments:
o width - specifies the width of the parbox, and
o text - the text that goes inside the parbox.
LaTeX will position a parbox so its centre lines up with the centre of the
text line. The optional position argument allows you to line up either the
top or bottom line in the parbox (default is top).
If the height argument is not given, the box will have the natural height of
the text.
The inner-pos argument controls the placement of the text inside the box. If
it is not specified, position is used.
o t --- text is placed at the top of the box.
o c --- text is centred in the box.
o b --- text is placed at the bottom of the box.
o s --- stretch vertically. The text must contain vertically stretchable space
for this to work.
A \parbox command is used for a parbox containing a small piece of text, with
nothing fancy inside. In particular, you shouldn't use any of the
paragraph-making environments inside a \parbox argument. For larger pieces of
text, including ones containing a paragraph-making environment, you should use
a minipage environment See minipage.
ΓòÉΓòÉΓòÉ 4.16.15. \raisebox ΓòÉΓòÉΓòÉ
\raisebox{distance}[extend-above][extend-below]{text}
The \raisebox command is used to raise or lower text. The first mandatory
argument specifies how high the text is to be raised (or lowered if it is a
negative amount). The text itself is processed in LR mode.
Sometimes it's useful to make LaTeX think something has a different size than
it really does - or a different size than LaTeX would normally think it has.
The \raisebox command lets you tell LaTeX how tall it is.
The first optional argument, extend-above, makes LaTeX think that the text
extends above the line by the amount specified. The second optional argument,
extend-below, makes LaTeX think that the text extends below the line by the
amount specified.
ΓòÉΓòÉΓòÉ 4.16.16. \rule ΓòÉΓòÉΓòÉ
\rule[raise-height]{width}{thickness}
The \rule command is used to produce horizontal lines. The arguments are
defined as follows:
o raise-height - specifies how high to raise the rule (optional)
o width - specifies the length of the rule (mandatory)
o thickness - specifies the thickness of the rule (mandatory)
ΓòÉΓòÉΓòÉ 4.16.17. \savebox ΓòÉΓòÉΓòÉ
\sbox{cmd}[text]
\savebox{cmd}[width][pos]{text}
These commands typeset text in a box just as for \mbox or \makebox. However,
instead of printing the resulting box, they save it in bin cmd, which must
have been declared with \newsavebox.
ΓòÉΓòÉΓòÉ 4.16.18. \smallskip ΓòÉΓòÉΓòÉ
\smallskip
The \smallskip command is equivalent to \vspace{smallskipamount} where
smallskipamount is determined by the document class.
ΓòÉΓòÉΓòÉ 4.16.19. \usebox ΓòÉΓòÉΓòÉ
\usebox{cmd}
Prints the box most recently saved in bin cmd by a \savebox command.
ΓòÉΓòÉΓòÉ 4.16.20. \vfill ΓòÉΓòÉΓòÉ
The \vfill fill command produces a rubber length which can stretch or shrink
vertically.
ΓòÉΓòÉΓòÉ 4.16.21. \vspace ΓòÉΓòÉΓòÉ
\vspace[*]{length}
The \vspace command adds vertical space. The length of the space can be
expressed in any terms that LaTeX understands, i.e., points, inches, etc. You
can add negative as well as positive space with an \vspace command.
LaTeX removes vertical space that comes at the end of a page. If you don't
want LaTeX to remove this space, include the optional * argument. Then the
space is never removed.
ΓòÉΓòÉΓòÉ 4.17. Special Characters ΓòÉΓòÉΓòÉ
The following characters play a special role in LaTeX and are called ``special
printing characters'', or simply ``special characters''.
# $ % & ~ _ ^ \ { }
Whenever you put one of these special characters into your file, you are doing
something special. If you simply want the character to be printed just as any
other letter, include a \ in front of the character. For example, \$ will
produce $ in your output.
One exception to this rule is the \ itself because \\ has its own special
meaning. A \ is produced by typing $\backslash$ in your file.
Also, \~ means `place a tilde accent over the following letter', so you will
probably want to use \verb instead.
In addition, you can access any character of a font once you know its number
by using the \symbol command. For example, the character used for displaying
spaces in the \verb* command has the code decimal 32, so it can be typed as
\symbol{32}.
You can also specify octal numbers with ' or hexadecimal numbers with ", so
the previous example could also be written as \symbol{'40} or \symbol{"20}.
ΓòÉΓòÉΓòÉ 4.18. Splitting the Input ΓòÉΓòÉΓòÉ
A large document requires a lot of input. Rather than putting the whole input
in a single large file, it's more efficient to split it into several smaller
ones. Regardless of how many separate files you use, there is one that is the
root file; it is the one whose name you type when you run LaTeX.
\include
\includeonly
ΓòÉΓòÉΓòÉ 4.18.1. \include ΓòÉΓòÉΓòÉ
\include{file}
The \include command is used in conjunction with the \includeonly command for
selective inclusion of files. The file argument is the first name of a file,
denoting 'file.tex'. If file is one the file names in the file list of the
\includeonly command or if there is no \includeonly command, the \include
command is equivalent to
\clearpage
except that if the file 'file.tex' does not exist, then a warning message
rather than an error is produced. If the file is not in the file list, the
\include command is equivalent to \clearpage.
The \include command may not appear in the preamble or in a file read by
another \include command.
ΓòÉΓòÉΓòÉ 4.18.2. \includeonly ΓòÉΓòÉΓòÉ
\includeonly{file_list}
The \includeonly command controls which files will be read in by an \include
command. file_list should be a comma-separated list of filenames. Each
filename must match exactly a filename specified in a \include command. This
command can only appear in the preamble.
ΓòÉΓòÉΓòÉ 4.19. Starting & Ending ΓòÉΓòÉΓòÉ
Your input file must contain the following commands as a minimum:
\documentclass{class}
\begin{document}
┬╖┬╖┬╖ your text goes here ┬╖┬╖┬╖
\end{document}
where the class selected is one of the valid classes for LaTeX. See Document
Classes (and see Overview), for details of the various document classes
available locally.
You may include other LaTeX commands between the \documentclass and the
\begin{document} commands (i.e., in the `preamble').
ΓòÉΓòÉΓòÉ 4.20. Table of Contents ΓòÉΓòÉΓòÉ
A table of contents is produced with the \tableofcontents command. You put the
command right where you want the table of contents to go; LaTeX does the rest
for you. It produces a heading, but it does not automatically start a new
page. If you want a new page after the table of contents, include a \newpage
command after the \tableofcontents command.
There are similar commands \listoffigures and \listoftables for producing a
list of figures and a list of tables, respectively. Everything works exactly
the same as for the table of contents.
NOTE: If you want any of these items to be generated, you cannot have the
\nofiles command in your document.
\addcontentsline
\addtocontents
ΓòÉΓòÉΓòÉ 4.20.1. \addcontentsline ΓòÉΓòÉΓòÉ
\addcontentsline{file}{sec_unit}{entry}
The \addcontentsline command adds an entry to the specified list or table
where:
o file is the extension of the file on which information is to be written: toc
(table of contents), lof (list of figures), or lot (list of tables).
o sec_unit controls the formatting of the entry. It should be one of the
following, depending upon the value of the file argument:
1. toc --- the name of the sectional unit, such as part or subsection.
2. lof --- figure
3. lot --- table
o entry is the text of the entry.
ΓòÉΓòÉΓòÉ 4.20.2. \addtocontents ΓòÉΓòÉΓòÉ
\addtocontents{file}{text}
The \addtocontents command adds text (or formatting commands) directly to the
file that generates the table of contents or list of figures or tables.
o file is the extension of the file on which information is to be written: toc
(table of contents), lof (list of figures), or lot (list of tables).
o text is the information to be written.
ΓòÉΓòÉΓòÉ 4.21. Terminal Input/Output ΓòÉΓòÉΓòÉ
\typeout
\typein
ΓòÉΓòÉΓòÉ 4.21.1. \typeout ΓòÉΓòÉΓòÉ
\typeout{msg}
Prints msg on the terminal and in the log file. Commands in msg that are
defined with \newcommand or \renewcommand are replaced by their definitions
before being printed.
LaTeX's usual rules for treating multiple spaces as a single space and
ignoring spaces after a command name apply to msg. A \space command in msg
causes a single space to be printed. A ^^J in msg prints a newline.
ΓòÉΓòÉΓòÉ 4.21.2. \typein ΓòÉΓòÉΓòÉ
\typein[cmd]{msg}
Prints msg on the terminal and causes LaTeX to stop and wait for you to type a
line of input, ending with return. If the cmd argument is missing, the typed
input is processed as if it had been included in the input file in place of
the \typein command. If the cmd argument is present, it must be a command
name. This command name is then defined or redefined to be the typed input.
ΓòÉΓòÉΓòÉ 4.22. Typefaces ΓòÉΓòÉΓòÉ
The typeface is specified by giving the ``size'' and ``style''. A typeface is
also called a ``font''.
Styles
Sizes
Low-level font commands
ΓòÉΓòÉΓòÉ 4.22.1. \Styles ΓòÉΓòÉΓòÉ
The following type style commands are supported by LaTeX.
These commands are used like \textit{italics text}. The corresponding command
in parenthesis is the ``declaration form'', which takes no arguments. The
scope of the declaration form lasts until the next type style command or the
end of the current group.
The declaration forms are cumulative; i.e., you can say \sffamily\bfseries to
get sans serif boldface.
You can also use the environment form of the declaration forms; e.g.
\begin{ttfamily}┬╖┬╖┬╖\end{ttfamily}.
\textrm (\rmfamily) Roman.
\textit (\itshape)
\emph Emphasis (toggles between \textit and \textrm).
\textmd (\mdseries)Medium weight (default). The opposite of boldface.
\textbf (\bfseries)Boldface.
\textup (\upshape)Upright (default). The opposite of slanted.
\textsl (\slshape)Slanted.
\textsf (\sffamily)Sans serif.
\textsc (\scshape)Small caps.
\texttt (\ttfamily)Typewriter.
\textnormal (\normalfont)Main document font.
\mathrm Roman, for use in math mode.
\mathbf Boldface, for use in math mode.
\mathsf Sans serif, for use in math mode.
\mathtt Typewriter, for use in math mode.
\mathit Italics, for use in math mode, e.g. variable names with several
letters.
\mathnormalFor use in math mode, e.g. inside another type style declaration.
\mathcal `Calligraphic' letters, for use in math mode.
In addition, the command \mathversion{bold} can be used for switching to bold
letters and symbols in formulas. \mathversion{normal} restores the default.
ΓòÉΓòÉΓòÉ 4.22.2. Sizes ΓòÉΓòÉΓòÉ
The following standard type size commands are supported by LaTeX.
The commands as listed here are "declaration forms". The scope of the
declaration form lasts until the next type style command or the end of the
current group.
You can also use the environment form of these commands; e.g.
\begin{tiny}┬╖┬╖┬╖\end{tiny}.
\tiny
\scriptsize
\footnotesize
\small
\normalsize(default)
\large
\Large
\LARGE
\huge
\Huge
ΓòÉΓòÉΓòÉ 4.22.3. Low-level font commands ΓòÉΓòÉΓòÉ
These commands are primarily intended for writers of macros and packages. The
commands listed here are only a subset of the available ones. For full
details, you should consult Chapter 7 of The LaTeX Companion.
\fontencoding{enc} Select font encoding. Valid encodings include OT1 and T1.
\fontfamily{family}Select font family. Valid families include:
1. cmr for Computer Modern Roman
2. cmss for Computer Modern Sans Serif
3. cmtt for Computer Modern Typewriter
and numerous others.
\fontseries{series}Select font series. Valid series include:
1. m Medium (normal)
2. b Bold
3. c Condensed
4. bc Bold condensed
5. bx Bold extended
and various other combinations.
\fontshape{shape}Select font shape. Valid shapes are:
1. n Upright (normal)
2. it Italic
3. sl Slanted (oblique)
4. sc Small caps
5. ui Upright italics
6. ol Outline
The two last shapes are not available for most font families.
\fontsize{size}{skip}Set font size. The first parameter is the font size to
switch to; the second is the \baselineskip to use. The unit of both
parameters defaults to pt. A rule of thumb is that the baselineskip
should be 1.2 times the font size.
\selectfontThe changes made by calling the four font commands described above
do not come into effect until \selectfont is called.
\usefont{enc}{family}{series}{shape}Equivalent to calling \fontencoding,
\fontfamily, \fontseries and \fontshape with the given parameters,
followed by \selectfont.
ΓòÉΓòÉΓòÉ 5. Parameters ΓòÉΓòÉΓòÉ
The input file specification indicates the file to be formatted; TeX uses
'.tex' as a default file extension. If you omit the input file entirely, TeX
accepts input from the terminal. You specify command options by supplying a
string as a parameter to the command; e.g.
latex ``\scrollmode
will process 'foo.tex' without pausing after every error.
Output files are always created in the current directory. When you fail to
specify an input file name, TeX bases the output names on the file
specification associated with the logical name TEX_OUTPUT, typically
texput.log.
ΓòÉΓòÉΓòÉ 6. Concept Index ΓòÉΓòÉΓòÉ
Accessing any character of a font Special Characters
Aligning Equations eqnarray
Appendix, creating \appendix
Arrays, math array
article class Document Classes
Author, for titlepage \author
Bibliography, creating (automatically) Using BibTeX
Bibliography, creating (manually) thebibliography
BibTeX, using Using BibTeX
book class Document Classes
Boxes Spaces & Boxes
Centering text \centering
Centering text, environment for center
Characters, reserved Special Characters
Characters, special Special Characters
Classes of document Document Classes
Commands, defining new ones \newcommand
Computer programs, typesetting verbatim
Counters, a list of Counters
Counters, creating \newcounter
Counters, getting the value of \value
Counters, setting \setcounter
Creating letters Letters
Creating pictures picture
Creating tables table
Cross referencing Cross References
Cross referencing using page number \pageref
Cross referencing using section number \ref
Date, for titlepage \date
Defining a new command \newcommand
Defining new environments \newenvironment
Defining new fonts \newfont
Defining new theorems \newtheorem
Displaying quoted text quote
Displaying quoted text with paragraph indentation quotation
Document Classes Document Classes
Ending & Starting Starting & Ending
Enlarge current page \enlargethispage
Environments Environments
Environments, defining \newenvironment
Equations, aligning eqnarray
Equations, environment for equation
Figures, footnotes in minipage
Flushing a page \clearpage
Font commands, low-level Low-level font commands
Font Sizes Sizes
Font Styles \Styles
Fonts Typefaces
Fonts, new commands for \newfont
Footnotes in figures minipage
Footnotes, creating Footnotes
Formatting Text \centering
Formulae, environment for equation
Formulae, maths Math Formulae
Global options Document Classes
Greek letters Math Symbols
Hyphenation, defining \hyphenation
Hyphenation, forcing \-
Indent, forcing \indent
Indent, suppressing \noindent
Input file, splitting Splitting the Input
Input/Output Terminal Input/Output
Inserting figures figure
Justification, ragged left \raggedleft
Justification, ragged right \raggedright
Labelled lists, creating description
LaTeX overview Overview of LaTeX and Local
Guide
Left-justifying text \raggedright
Left-justifying text, environment for flushleft
Left-to-right mode Modes
Lengths, adding to \addtolength
Lengths, defining a new \newlength
Lengths, defining and using Lengths
Lengths, predefined Predefined lengths
Lengths, setting value of \setlength
letter class Document Classes
Letters Letters
Letters, declarations for Declarations
Letters, ending \closing
Letters, starting \opening
Line Breaking Line & Page Breaking
Line breaks \linebreak
Lines in tables tabular
Lining text up in columns using tab stops tabbing
Lining text up in tables tabular
Lists of items itemize
Lists of items, generic list
Lists of items, numbered enumerate
Loading additional packages Document Classes
Low-level font commands Low-level font commands
LR mode Modes
Making a title page titlepage
Making paragraphs Making Paragraphs
Margin Notes Margin Notes
Math Formulae Math Formulae
Math mode Modes
Math mode, entering Math Formulae
Math mode, spacing Spacing in Math Mode
Maths Miscellany Math Miscellany
Maths symbols Math Symbols
Minipage, creating a minipage
Modes Modes
Multicolumn text \twocolumn
New line, starting \\
New line, starting (paragraph mode) \newline
New Page \newpage
Notes in the margin Margin Notes
Options, global Document Classes
Overview of LaTeX Overview of LaTeX and Local
Guide
Packages, loading Document Classes
Page break, forcing \pagebreak
Page Breaking Line & Page Breaking
Page Formatting Line & Page Breaking
Page numbering \pagenumbering
Page styles Page Styles
Paragraph mode Modes
Paragraph, starting a new \par
Paragraphs Making Paragraphs
Pictures, creating picture
Poetry, an environment for verse
Predefined lengths Predefined lengths
Programs, typesetting verbatim
Quoted text with paragraph indentation, displaying quotation
Quoted text, displaying quote
Ragged left text \raggedleft
Ragged left text, environment for flushright
Ragged right text \raggedright
Ragged right text, environment for flushleft
Remarks in the margin Margin Notes
report class Document Classes
Reserved Characters Special Characters
Right-justifying text \raggedleft
Right-justifying text, environment for flushright
Sectioning Sectioning
Simulating typed text verbatim
Sizes of text Sizes
Space, inserting vertical \addvspace
Spaces Spaces & Boxes
Spacing, within Math mode Spacing in Math Mode
Special Characters Special Characters
Splitting the input file Splitting the Input
Starting & Ending Starting & Ending
Starting on a right-hand page \cleardoublepage
Styles of text \Styles
Styles, page Page Styles
Subscript Subscripts & Superscripts
Superscript Subscripts & Superscripts
Symbols Math Symbols
Tab stops, using tabbing
Table of Contents, creating Table of Contents
Tables, creating table
Terminal Input/Output Terminal Input/Output
Thanks, for titlepage \thanks
Theorems, defining \newtheorem
Theorems, typesetting theorem
Title making \maketitle
Title pages, creating titlepage
Title, for titlepage \title
Typed text, simulating verbatim
Typeface Sizes Sizes
Typeface Styles \Styles
Typefaces Typefaces
Using BibTeX Using BibTeX
Variables, a list of Counters
Verbatim text \verb
Vertical space, inserting \addvspace
ΓòÉΓòÉΓòÉ 7. List of Commands ΓòÉΓòÉΓòÉ
$ Math Formulae
array array
center center
description description
enumerate enumerate
eqnarray eqnarray
equation equation
figure figure
flushleft flushleft
flushright flushright
itemize itemize
letter letter
list list
lrbox lrbox
minipage minipage
picture picture
quotation quotation
quote quote
tabbing tabbing
table table
tabular tabular
thebibliography thebibliography
theorem theorem
titlepage titlepage
verbatim verbatim
verse verse
\! Spacing in Math Mode
\' (tabbing) tabbing
\( Math Formulae
\) Math Formulae
\+ tabbing
\, Spacing in Math Mode
\- (hyphenation) \-
\- (tabbing) tabbing
\; Spacing in Math Mode
\< tabbing
\= tabbing
\> tabbing
\a tabbing
\addcontentsline \addcontentsline
\address \address
\addtocontents \addtocontents
\addtocounter \addtocounter
\addtolength \addtolength
\addvspace \addvspace
\alph \alph
\alph
\appendix \appendix
\arabic \arabic
\author \author
\backslash Special Characters
\begin Environments
\bfseries \Styles
\bibitem \bibitem
\bibliography Using BibTeX
\bibliographystyle Using BibTeX
\bigskip \bigskip
\caption figure
\cc Letters
\cdots Math Miscellany
\centering \centering
\chapter Sectioning
\circle \circle
\cite \cite
\cleardoublepage \cleardoublepage
\clearpage \clearpage
\cline \cline
\closing \closing
\COLON Spacing in Math Mode
\dashbox \dashbox
\date \date
\ddots Math Miscellany
\depth Predefined lengths
\documentclass Document Classes
\dotfill \dotfill
\emph \Styles
\encl Letters
\end Environments
\enlargethispage \enlargethispage
\fbox \fbox
\flushbottom \flushbottom
\fnsymbol \fnsymbol
\fontencoding Low-level font commands
\fontfamily Low-level font commands
\fontseries Low-level font commands
\fontshape Low-level font commands
\fontsize Low-level font commands
\footnote \footnote
\footnotemark \footnotemark
\footnotesize Sizes
\footnotetext \footnotetext
\frac Math Miscellany
\frame \frame
\framebox \framebox
\framebox
\fussy \enlargethispage
\height Predefined lengths
\hfill \hfill
\hline \hline
\hrulefill \hrulefill
\hspace \hspace
\huge Sizes
Sizes
\hyphenation \hyphenation
\include \include
\includeonly \includeonly
\indent \indent
\item itemize
\itshape \Styles
\kill tabbing
\label \label
\large Sizes
Sizes
Sizes
\ldots Math Miscellany
\lefteqn eqnarray
\line \line
\linebreak \linebreak
\linethickness \linethickness
\listoffigures Table of Contents
\listoftables Table of Contents
\location \location
\makebox \makebox
\makebox (picture) \makebox
\makelabels Letters
\maketitle \maketitle
\mark \mark
\mathbf \Styles
\mathcal \Styles
\mathit \Styles
\mathnormal \Styles
\mathrm \Styles
\mathsf \Styles
\mathtt \Styles
\mathversion \Styles
\mbox \mbox
\mdseries \Styles
\medskip \medskip
\multicolumn \multicolumn
\multiput \multiput
\newcommand \newcommand
\newcounter \newcounter
\newenvironment \newenvironment
\newfont \newfont
\newlength \newlength
\newline \newline
\newpage \newpage
\newsavebox \newsavebox
\newtheorem \newtheorem
\nocite \nocite
\nofiles Table of Contents
\noindent \noindent
\nolinebreak \nolinebreak
\nopagebreak \nopagebreak
\normalfont \Styles
\normalsize Sizes
\onecolumn \onecolumn
\opening \opening
\oval \oval
\overbrace Math Miscellany
\overline Math Miscellany
\pagebreak \pagebreak
\pagenumbering \pagenumbering
\pageref \pageref
\pagestyle \pagestyle
\par \par
\paragraph Sectioning
\parbox \parbox
\ps Letters
\pushtabs tabbing
tabbing
\put \put
\raggedbottom \raggedbottom
\raggedleft \raggedleft
\raggedright \raggedright
\raisebox \raisebox
\ref \ref
\refstepcounter \refstepcounter
\rmfamily \Styles
\roman \roman
\roman
\rule \rule
\savebox \savebox
\scriptsize Sizes
\scshape \Styles
\selectfont Low-level font commands
\setcounter \setcounter
\setlength \setlength
\settodepth \settodepth
\settoheight \settoheight
\settowidth \settowidth
\sffamily \Styles
\shortstack \shortstack
\signature \signature
\sloppy \pagebreak
\slshape \Styles
\small Sizes
\smallskip \smallskip
\sqrt Math Miscellany
\stepcounter \stepcounter
\subparagraph Sectioning
\subsection Sectioning
\subsubsection Sectioning
\symbol Special Characters
\tableofcontents Table of Contents
\telephone \telephone
\textbf \Styles
\textit \Styles
\textmd \Styles
\textnormal \Styles
\textrm \Styles
\textsc \Styles
\textsf \Styles
\textsl \Styles
\texttt \Styles
\textup \Styles
\thanks \thanks
\thispagestyle \thispagestyle
\tiny Sizes
\title \title
\today titlepage
\totalheight Predefined lengths
\ttfamily \Styles
\twocolumn \twocolumn
\typein \typein
\typeout \typeout
\underbrace Math Miscellany
\ underline Math Miscellany
\upshape \Styles
\usebox \usebox
\usecounter \usecounter
\usefont Low-level font commands
\usepackage Document Classes
\value \value
\vdots Math Miscellany
\vector \vector
\verb \verb
\vfill \vfill
\vline \vline
\vspace \vspace
\width Predefined lengths
\[ Math Formulae
\\ \\
\] Math Formulae
\` (tabbing) tabbing
^ Subscripts & Superscripts
_ Subscripts & Superscripts